'''
加载QWidget UI的模版
'''
import sys
from PyQt5.QtWidgets import QApplication, QWidget
from ui.Ui_my_widget import Ui_MyWidget

class MyWidget(QWidget):
    def __init__(self):
        super().__init__()
        self.ui = Ui_MyWidget()
        self.ui.setupUi(self)
        
        self.init_ui()
    
    '''
    加载UI只需要修改下面的内容, 上面内容不需要修改
    '''
    def on_btn_click(self):
        print("按钮按下")
            
    def init_ui(self):
        self.ui.btn_send.clicked.connect(self.on_btn_click)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    
    w = MyWidget()
    w.show()
    
    sys.exit(app.exec_())
    